
import Vue from "vue"
import VueRouter from "vue-router"

Vue.use(VueRouter)

import {menus} from "@/utils/menus"

const routes = [
    {path:"/",redirect:"/login"},
    {path:"/login",name:"login",component:()=>import("@/views/Login.vue")},
    {path:"/index",
    name:"index",
    component:()=>import("@/views/Index.vue"),
    redirect:"/index/home",
    children:[
        ...menus
    ]
      
    },   
    {path:"/404",name:"notfount",component:()=>import("@/views/Notfount.vue")},
    {path:"*",redirect:{name:"notfount"}}
]

const router = new VueRouter({
    routes,
    mode:"hash",
    base:""
})

export default router